Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix skip message #398

Merged
merged 1 commit into from
May 7, 2024
Merged

fix skip message #398

merged 1 commit into from
May 7, 2024

Conversation

swryan
Copy link
Contributor

@swryan swryan commented May 7, 2024

Purpose

This is a small fix to the message raised when this test is skipped. The test is parameterized and could be testing one of two optimizers (IPOPT or SNOPT), but the message is hard coded to SNOPT.

/home/runner/work/pyoptsparse/pyoptsparse/tests/test_user_termination.py:TestUserTerminationStatus.test_obj_0_IPOPT  ... SKIP (00:00:0.00, 145 MB)
Optimizer not available: IPOPT
/home/runner/work/pyoptsparse/pyoptsparse/tests/test_user_termination.py:TestUserTerminationStatus.test_obj_1_SNOPT ... OK (00:00:0.01, 145 MB)
/home/runner/work/pyoptsparse/pyoptsparse/tests/test_user_termination.py:TestUserTerminationStatus.test_sens_0_IPOPT  ... SKIP (00:00:0.00, 145 MB)
Optimizer not available: SNOPT
/home/runner/work/pyoptsparse/pyoptsparse/tests/test_user_termination.py:TestUserTerminationStatus.test_sens_1_SNOPT ... OK (00:00:0.01, 145 MB)

Expected time until merged

Not urgent.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

When the test is run and IPOPT is not installed, the skip message should properly reflect that it was skipped due to IPOPT, not SNOPT:

/home/runner/work/pyoptsparse/pyoptsparse/tests/test_user_termination.py:TestUserTerminationStatus.test_sens_0_IPOPT  ... SKIP (00:00:0.00, 168 MB)
Optimizer not available: IPOPT

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@swryan swryan requested a review from a team as a code owner May 7, 2024 13:20
@swryan swryan requested review from lamkina and sseraj May 7, 2024 13:20
Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.79%. Comparing base (a988404) to head (d306e79).

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #398       +/-   ##
===========================================
- Coverage   74.10%   62.79%   -11.31%     
===========================================
  Files          22       22               
  Lines        3290     3290               
===========================================
- Hits         2438     2066      -372     
- Misses        852     1224      +372     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sseraj sseraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

Copy link
Contributor

@lamkina lamkina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@lamkina lamkina merged commit 377c377 into mdolab:main May 7, 2024
11 of 12 checks passed
@swryan swryan deleted the fix_skip_msg branch May 15, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants